package com.robotserver.orders.entity;

import java.io.Serializable;

/**
 * alimm_tokens
 * @author 
 */
public class AlimmTokens extends BaseEntity {
    private Long userId;
    private String userName;
    private String accessToken;
    private Integer exptime;
    private Integer tokentype;
    private Integer turnlink;
    private Long mmUserId;

    //下面字段不是数据库字段，是临时字段，方便业务使用
    private Long beginTime;  //查询开始时间
    private Long endTime;    //查询结束时间
    private int type;        //正常订单时：0付款订单 1结算订单 2确认收货订单;;  维权订单时;1-维权发起时间，2-订单结算时间（正向订单），3-维权完成时间，4-订单创建时间，5-订单更新时间
    private Long orderScene; //场景订单场景类型，1:常规订单，2:渠道订单，3:会员运营订单，默认为1
    private String redisQueueKey; //保存到redis队列KEY
    private Long timeType;   // 1：按照订单淘客创建时间查询，2:按照订单淘客付款时间查询，3:按照订单淘客结算时间查询 4:按照订单更新时间

    @Override
    protected Serializable pkVal() {
        return this.getId();
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public Integer getExptime() {
        return exptime;
    }

    public void setExptime(Integer exptime) {
        this.exptime = exptime;
    }

    public Integer getTokentype() {
        if(tokentype == null){
            tokentype = 2;
        }
        return tokentype;
    }

    public Integer getTurnlink() {
        if(turnlink == null){
            turnlink = 0;
        }
        return turnlink;
    }

    public void setTurnlink(Integer turnlink) {
        this.turnlink = turnlink;
    }

    public Long getMmUserId() {
        return mmUserId;
    }

    public void setMmUserId(Long mmUserId) {
        this.mmUserId = mmUserId;
    }

    public void setTokentype(Integer tokentype) {
        this.tokentype = tokentype;
    }

    public Long getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Long beginTime) {
        this.beginTime = beginTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Long getOrderScene() {
        return orderScene;
    }

    public void setOrderScene(Long orderScene) {
        this.orderScene = orderScene;
    }

    public String getRedisQueueKey() {
        return redisQueueKey;
    }

    public void setRedisQueueKey(String redisQueueKey) {
        this.redisQueueKey = redisQueueKey;
    }

    public Long getTimeType() {
        return timeType;
    }

    public void setTimeType(Long timeType) {
        this.timeType = timeType;
    }
}